<template>
  <div class="table-item-value" ref="tableItemValue">{{ num }}</div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      num: 0
    }
  },
  props: ['params'],
  created() {},
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    init() {
      let _this = this
      let tl = new TimelineMax({})
      let tableItemValue = TweenMax.to(this.$refs.tableItemValue, 0.3, {
        opacity: 1,
        scale: 1
      })
      let value = TweenMax.to(this, 0.8, {
        num: () => _this.params,
        roundProps: { num: 0.1 }
      })
      tl.addLabel('start')
        .add(tableItemValue, 'start+=0.3')
        .add(value, 'start+=0.2')
      return tl
    }
  }
}
</script>
<style lang="scss" scoped>
.table-item-value {
  font-size: 14px;
  font-family: 'Acens';
  line-height: 36px;
  color: #fff;
  // text-shadow: 2px 0 3px rgba(0, 247, 250, 0.4),-2px 0 3px rgba(0, 247, 250, 0.4);
  display: inline-block;
}
</style>
